<?php $this->load->view('layout/jingqu/header');?>
<div class="order-page screen-width clearfix">
    <div class="order-left">
        <?php $this->load->view('layout/account_left');?>
    </div>
    <div class="order-right">
        <div class="your-choice">
            <h5>账号安全</h5>
            <ul class="clearfix choice-ul">
                <li>
                    <a href="<?php echo site_url('customer/personal');?>">个人信息</a>
                </li>
                <li>
                    <a href="<?php echo site_url('customer/accountRecord');?>">账号信息</a>
                </li>
                <li>
                    <a href="<?php echo site_url('customer/JuniorMember');?>">检票帐号</a>
                </li>
                <li class="active">
                    <a href="<?php echo site_url('customer/modifyPw');?>">修改密码</a>
                </li>
                <!-- <li>
                    <a href="<?php echo site_url('customer/accountSecurity');?>">账号安全</a>
                </li> -->
            </ul>
        </div>
        <div class="your-safe">
            <div class="safe-head clearfix">
                <div class="safe-good">
                    <?php if (!empty($useInfo->personal_photo)) :?>
                        <img src="<?php echo $this->config->show_image_url($useInfo->personal_photo);?>">
                    <?php else :?>
                        <img src="/skins/images/photo0.jpg">
                    <?php endif;?>
                    <!-- <a href="#">编辑头像</a> -->
                </div>
                <div class="safe-dape">
                    <p>用户账号：<?php echo $userInfo->user_name; ?></p>
                    <p>用户类型：<span><?php echo $this->userTypeName; ?></span></p>
                    <p class="safe-min">建议您启动全部安全设置，以保障账号及资金安全。</p>
                </div>
            </div>
            <div class="safe-option clearfix">
                <i class="safe-icon iconfont">&#xe604;</i>
                <div class="safe-depict">
                    <h4>密码修改</h4>
                    <p>经常的更换您的账号密码，并且不要和其他账号共用一个密码</p>
                </div>
                <div class="safe-handle">
                    <a href="<?php echo site_url('validate/modifyPw') ?>" class="safe-button">修改密码</a>
                </div>
            </div>
            <?php $isBindingEmail = empty($userInfo->user_email) ? false : true; ?>
            <div class="safe-option clearfix">
                <i class="safe-icon <?php echo $isBindingEmail ? '' : 'icon-false';?> iconfont"><?php echo $isBindingEmail ? '&#xe604' : '&#xe603'; ?></i>
                <div class="safe-depict">
                    <h4>绑定邮箱</h4>
                    <p>邮箱将是您的有效身份证，在保证安全的同时还可以提供更便捷的订单提醒服务</p>
                </div>
                <div class="safe-handle">
                    <?php if($isBindingEmail ): ?>
                        <a href="<?php echo site_url('validate/modifyMail') ?>" class="safe-button">修改邮箱</a>
                    <?php else: ?>
                        <a href="<?php echo site_url('validate/modifyMail') ?>" class="safe-button">立即绑定</a>
                    <?php endif; ?>
                </div>
            </div>
            <?php $isBindingPhone = empty($userInfo->mobile_phone) ? false : true; ?>
            <div class="safe-option clearfix">
                <i class="safe-icon <?php echo $isBindingPhone ? '' : 'icon-false';?> iconfont">
                    <?php echo $isBindingPhone ? '&#xe604' : '&#xe603'; ?>
                </i>
                <div class="safe-depict">
                    <h4>绑定手机</h4>
                    <?php if( $isBindingPhone ): ?>
                        <p>您绑定的手机：<?php echo subStrMobilePhone($userInfo->mobile_phone); ?></p>
                    <?php else: ?>
                        <p>您还未绑定手机，请立即绑定。</p>
                    <?php endif; ?>
                </div>
                <div class="safe-handle">
                    <?php if( $isBindingPhone ): ?>
                        <a href="<?php echo site_url('validate/modifyPhone') ?>" class="safe-button">修改手机</a>
                    <?php else: ?>
                        <a href="<?php echo site_url('validate/bindingPhone') ?>" class="safe-button">立即绑定</a>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $this->load->view('layout/jingqu/footer');?>